// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import Axios from "axios";
import WBT from "./js/webscoket/WS";
import WS from './js/webscoket/WS';

Vue.prototype.axios=Axios
Vue.config.productionTip = false;
Vue.prototype.$WBT=WBT;
Vue.use(ElementUI);

// const ip='localhost';
// const port='9999';

const ip=WS.ip
const port=WS.port

const domain=`http://${ip}${port===''||port==null?'':(':'+port)}`
const getUser='/test/getUser';
const updateUser='/test/updateUser'

Vue.prototype.myHttp={
  getUser(){
    return  Axios.get(domain+getUser);
  },
  updateUser(obj){
    return  Axios.post(domain+updateUser,obj);
  }
}



/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
